<?php

/**
 * TemplateSetting form.
 *
 * @package    berta-s
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class TemplateSettingForm extends SettingFormCommons //BaseTemplateSettingForm
{
	public function configure(){
		// reset - our form will show custom values and model will save them on settings array field
		$this->useFields();

        $templateDirectory=$this->getObject()->getTemplate()->getDirectoryName();
        $templateFullPath=sfConfig::get('sf_plugins_dir')."/bertaTwigPlugin/templates/{$templateDirectory}";
        $yaml=sfYaml::load("{$templateFullPath}/settings.yml");

        FormYamlConfig::configFormFromYaml($this, $yaml);
	}

	public function getModelName(){
    	return 'TemplateSetting';
	}

}
